package com.kongl.lottery.order.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name = "orders")
public class Order {
    @Id
    private String oid;
    private Date createTime;
    private Double total;
    private String uid;
    //订单状态  0:未付款、1:待开奖、2:已中奖、3:已对奖、4:未中奖
    private Integer status;
    @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER,mappedBy = "oid")
    private List<OrderItem> orderItems;
}
